package com.atguigu.JDBC;

import org.junit.jupiter.api.Test;

import java.util.List;

/**
 * @author haoranlu
 * @project IntelliJ IDEA
 */
public class TestDepartmentDAOImp1 {
    private DepartmentDAO dd = new DepartmentDAOImp1();
    @Test
    public void test01(){
        Department d = new Department();
        d.setDepname("发钱部");
        d.setDeinfo("ffffff");
        dd.addDepartment(d);
    }
    @Test
    public  void test02(){
        Department d = dd.getById(335);
        System.out.println(d);

        d.setDepname("花钱不");
        dd.updateDepartment(d);

    }
    @Test
    public void test03(){
        Department d = dd.getById(1);
        System.out.println(d);
    }
    @Test
    public void test04(){
        List<Department> list = dd.getAll();
        list.forEach(System.out::println);
    }
}
